home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Drivers / vc_2_2.lha / ParNet / Source / devices / parnet.h
Encoding:
C/C++ Source or Header  |  1994-11-02  |  3.1 KB  |  96 lines

  1. /*
  2. ** $Header: SRC:CVSROOT/Vector/ParNet/devices/parnet.h,v 1.1.1.1 1994/06/23 02:39:45 Barnard Exp $
  3. */
  4.  
  5. /*
  6. ** This code was originally written by Matthew Dillon and put into Public Domain
  7. **
  8. ** All changes concerning the adaption of Matt's original code to the
  9. ** Vector Connection I/O board are © 1991-1994 by Henning Schmiedehausen
  10. ** All rights for this changes are reserved. The original code is Public Domain
  11. **
  12. ** This code is distributed with the expressed written permission of Matthew
  13. ** Dillon (Thank you very much, Matt)
  14. **
  15. */
  16.  
  17. /*
  18.  *  DEVICES/PARNET.H
  19.  *
  20.  */
  21.  
  22. #ifndef DEVICES_PARNET_H
  23. #define DEVICES_PARNET_H
  24.  
  25. #ifndef PARNET_SRC
  26. #define UNIT   APTR
  27. #define DEVICE APTR
  28. #else
  29. #define UNIT Unit
  30. #define DEVICE Device
  31. #endif
  32.  
  33. typedef struct {
  34.     struct  Message io_Message;
  35.     DEVICE  *io_Device;         /* device node pointer    */
  36.     UNIT    *io_Unit;            /* unit (protocol private)  */
  37.     UWORD   io_Command;         /* device command        */
  38.     UBYTE   io_Flags;            /* IOF_QUICK        */
  39.     BYTE    io_Error;            /* error or warning num    */
  40.     ULONG   io_Actual;            /* actual number of bytes transferred   */
  41.     ULONG   io_Length;            /* requested number bytes transferred   */
  42.     APTR    io_Data;            /* points to data area            */
  43.     ULONG   io_Offset;            /* offset for block structured devices  */
  44.     UWORD   io_Port;
  45.     UWORD   io_Addr;
  46.     APTR    io_Data2;            /* more data                */
  47.     ULONG   io_Length2;         /* must be 0 if you do not use these fields */
  48. } IOParReq;
  49.  
  50. /*
  51.  *  OpenDevice(), protocols.
  52.  *
  53.  *  DEFAULT
  54.  */
  55.  
  56. #define PRO_MASK    0x001F
  57. #define PRO_CONTROL    0x0000
  58. #define PRO_DGRAM    0x0001
  59. #define PRO_STREAM    0x0002
  60.  
  61. #define PRO_LAST    PRO_STREAM
  62.  
  63. /*
  64.  *  Extended Command Set
  65.  */
  66.  
  67. #define PPD_SETADDR    (CMD_NONSTD+0)      /*  set my network address  */
  68. #define PPD_SETTO    (CMD_NONSTD+1)      /*  set network timeout     */
  69. #define PPD_SHUTDOWN    (CMD_NONSTD+2)      /*  shutdown a stream conn. */
  70. #define PPD_CONNECT    (CMD_NONSTD+3)      /*  connect to a port       */
  71. #define PPD_LISTEN    (CMD_NONSTD+5)      /*  listen for a connection */
  72.  
  73. /*
  74.  *  Extended Error codes    (placed in io_Actual for OpenDevice() call)
  75.  */
  76.  
  77. #define PPERR_NOPORTRES     -32     /*  can't get MR_PARALLELPORT misc res. */
  78. #define PPERR_NOBITSRES     -33     /*  can't get MR_PARALLELBITS misc res. */
  79. #define PPERR_NOTASK        -34     /*  can't create sub task               */
  80. #define PPERR_NOINT        -35     /*  can't allocate CIAA-FLAG interrupt  */
  81. #define PPERR_BADPROTOCOL   -36     /*  illegal protocol requested        */
  82. #define PPERR_BADFLAGS        -37     /*  illegal flags for protocol        */
  83. #define PPERR_ILLPORT        -38     /*  illegal port for protocol            */
  84. #define PPERR_ILLPORTLSN    -39     /*  somebody already listening on that port!    */
  85. #define PPERR_NOTIMPL        -40     /*  not implemented yet.        */
  86.  
  87. #define PPERR_WARN_OVFLOW   -41     /*  dgram, data overflow        */
  88. #define PPERR_PORT_IN_USE   -42     /*  port is in use by another protocol    */
  89. #define PPERR_NO_PORTS        -43     /*  no more ports available !!        */
  90. #define PPERR_HOSTDOWN1     -44     /*  remote machine does not respond    */
  91. #define PPERR_HOSTDOWN2     -45     /*  remote machine does not respond    */
  92.  
  93. #endif
  94.  
  95.  
  96.